package com.lepu.app.fun.my.bean;

import java.io.Serializable;
import org.json.JSONException;
import org.json.JSONObject;

import com.lepu.app.fun.my.bean.BeanMyCollect;

@SuppressWarnings("serial")
public class BeanMsg  extends BeanMyCollect implements Serializable{

    public int bbsCount;  
    public int osCount;   
    public int fansCount; 
    public int asdCount;  
    public int transCount;

    public static BeanMsg parseJsonData(String dataString) {
    	BeanMsg beanMsg = new BeanMsg();
        try {
            JSONObject jsonObject = new JSONObject(dataString);
            JSONObject obj1 = (JSONObject) jsonObject.get("Result");
            JSONObject objDetail = obj1.getJSONObject("DetailInfo");
            
            beanMsg.bbsCount = objDetail.getInt("ForumMessageCount");  //帖子动态数量
            beanMsg.osCount = objDetail.getInt("SystemMessageCount");  //系统消息数量
            beanMsg.fansCount = objDetail.getInt("FansMessageCount");  //粉丝数量
            beanMsg.asdCount = objDetail.getInt("ASDMessageCount");  //随心诊
            beanMsg.transCount = objDetail.getInt("TransferHospitalMessageCount");  //转诊
				
        } catch (JSONException e) {
            e.printStackTrace();
        }
        
        return beanMsg;
    }
    
}
